// pages/Movie details/Movie details.js
const app = new getApp();
Page({
  data: {
    //电影列表
    list: [],
  },
  onLoad(id) {
    this.getData(id.id);
  },
  getData(id) {
    app.get("film/detail?id="+id).then(res => {
      let time = new Date(res.data.premiereAt)
      let timer = `${time.getFullYear()}-${time.getMonth()+1}-${time.getDate()}`;
      res.data.premiereAt = timer;
      this.setData({
        list: res.data
      },wx.hideLoading())
      
    })
  },
 
})